function Activity(activityHTML) {

	var dispatcher = new air.EventDispatcher();
	
		//Forward the event-related calls to the EventDispatcher object
		this.addEventListener = function (){
			dispatcher.addEventListener.apply(this, Array.prototype.slice.apply(arguments));
		}
		
		this.removeEventListener = function (){
			dispatcher.removeEventListener.apply(this, Array.prototype.slice.apply(arguments));	
		}	

		this.dispatchEvent = function (event){
			dispatcher.dispatchEvent(event);	
		}
	
	

	var curScreen = air.Screen.screens[0];
	
	//Sets the window message variable in response to the (AIR-only) DOM initialize event.
	var onInitialize = function (){
		htmlLoader.removeEventListener(air.Event.HTML_DOM_INITIALIZE, onInitialize);
		htmlLoader.window.activityHTML = activityHTML;
	}
	
	//Cleans up references when the window closes
	var onClose = function (){
		activityClose = new air.Event("activityClose", false, false);	
		dispatcher.dispatchEvent(activityClose);
		
		htmlLoader.window.nativeWindow.removeEventListener(air.Event.CLOSE, onClose);		
		htmlLoader = null;
		curScreen = null;
	}	
	
	/** Main constructor logic **/
	
	//Create the window initialization options
	var windowOptions = new air.NativeWindowInitOptions();
	windowOptions.type = air.NativeWindowType.LIGHTWEIGHT;
	windowOptions.systemChrome = air.NativeWindowSystemChrome.NONE;
	windowOptions.transparent = true;
	
	//Create the window
	var htmlLoader = air.HTMLLoader.createRootWindow(false, windowOptions, false);
	htmlLoader.window.nativeWindow.alwaysInFront = true;
	htmlLoader.window.nativeWindow.visible = true;
	htmlLoader.addEventListener(air.Event.HTML_DOM_INITIALIZE, onInitialize);
	htmlLoader.window.nativeWindow.addEventListener(air.Event.CLOSE, onClose);
	//load the html file for the window
	htmlLoader.load(new air.URLRequest("activity.html"));
}

